﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User_center/MainContent.Master"
    AutoEventWireup="true" CodeBehind="EditMyInfo.aspx.cs" Inherits="IService.User_center.EditMyInfo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<title>会员中心</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript">
    function checkInput() {
        var realUserName = $("#<%=lblRealUserName.ClientID %>").val().replace(' ', '');
        var companyName = $("#<%=lblCompanyName.ClientID %>").val().replace(' ', '');
        var employeesTotal = $("#<%=lblEmployeesTotal.ClientID %>").val().replace(' ', '');
        var foundedDate = $("#<%=lblFoundedDate.ClientID %>").val().replace(' ', '');
        var companyPhone = $("#<%=lblCompanyPhone.ClientID %>").val().replace(' ', '');
        var companyAddress = $("#<%=lblCompanyAddress.ClientID %>").val().replace(' ', '');

        var phone = $("#<%=lblPhone.ClientID %>").val().replace(' ', '');
        var userMobile = $("#<%=lblUserMobile.ClientID %>").val().replace(' ', '');
        var userFax = $("#<%=lblUserFax.ClientID %>").val().replace(' ', '');
        var email = $("#<%=lblEmail.ClientID %>").val().replace(' ', '');
        var userAddress = $("#<%=lblUserAddress.ClientID %>").val().replace(' ', '');
        var supply = $("#<%=txtSupply.ClientID %>").val().replace(' ', '');
        var purchase = $("#<%=txtPurchase.ClientID %>").val().replace(' ', '');
        var companyProfile = $("#<%=txtCompanyProfile.ClientID %>").val().replace(' ', '');

        //获取用户角色选中值        
        var strUserRole = "";
        var els = document.getElementById("<%=cblUserRole.ClientID %>");
        if (els != null) {
            var chks = els.getElementsByTagName("input");
            for (var k = 0, len = chks.length; k < len; k++) {
                var chk = chks[k];
                if (chk != null && chk.type == 'checkbox' && chk.checked) {
                    strUserRole += ',' + chk.value;
                }
            }
        }
        if (strUserRole.length > 1)
            strUserRole = strUserRole.substring(1);

        //获取行业分类选中值     
        var strClass = "";
        var els2 = document.getElementById("<%=cblIndustryClassification.ClientID %>");
        if (els2 != null) {
            var chks2 = els2.getElementsByTagName("input");
            for (var k = 0, len = chks2.length; k < len; k++) {
                var chk2 = chks2[k];
                if (chk2 != null && chk2.type == 'checkbox' && chk2.checked) {
                    strClass += ',' + chk2.value;
                }
            }
        }
        if (strClass.length > 1)
            strClass = strClass.substring(1);

        if (realUserName == '') {
            alert("真实姓名不能为空!");
            return false;
        } else if (strUserRole == '') {
            alert("请选择用户角色!");
            return false;
        } else if (phone == '') {
            alert("电话不能为空!");
            return false;
        } else if (userMobile == '') {
            alert("手机不能为空!");
            return false;
        } else if (userFax == '') {
            alert("传真不能为空!");
            return false;
        } else if (email == '') {
            alert("邮箱不能为空!");
            return false;
        } else if (userAddress == '') {
            alert("地址不能为空!");
            return false;
        } else if (companyName == '') {
            alert("公司名称不能为空!");
            return false;
        } else if (employeesTotal == '') {
            alert("公司员工人数不能为空!");
            return false;
        } else if (foundedDate == '') {
            alert("公司成立时间不能为空!");
            return false;
        } else if (companyPhone == '') {
            alert("公司联系电话不能为空!");
            return false;
        } else if (companyAddress == '') {
            alert("公司地址不能为空!");
            return false;
        } else if (strClass == '') {
            alert("请选择行业分类!");
            return false;
        } else if (supply == '') {
            alert("供应不能为空!");
            return false;
        } else if (purchase == '') {
            alert("采购不能为空!");
            return false;
        } else if (companyProfile == '') {
            alert("公司简介不能为空!");
            return false;
        }

        return true;
    }
	</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightMainContent" runat="server">
    <div class="sectionContainer">
        <p>
            <span class="textBlock">
                <asp:Label ID="lblRealUserName2" runat="server" Text="XXXXXX"></asp:Label>&nbsp;
            </span>您好，欢迎使用数字电视产业服务网
        </p>
        <!-- InstanceBeginEditable name="mainContent" -->
        <h1>
            <span>会员资料</span>
        </h1>
        <h3>
            会员基本信息</h3>
        <p>
            <label>
                会员帐号：</label><span class="textBlock">
                    <asp:Label ID="lblUserName" runat="server" Text="XXXXXX"></asp:Label>
                </span>
        </p>
        <p>
            <label>
                真实姓名：</label><span class="textBlock">
                    <asp:TextBox ID="lblRealUserName" runat="server"></asp:TextBox>
                </span>
        </p>
        <p>
            <label>
                注册时间：</label><span class="textBlock">
                    <asp:Label ID="lblRegistDateTime" runat="server" Text="XXXXXX"></asp:Label>
                </span>&nbsp;&nbsp;
            <label>
                最近登录时间：</label><span class="textBlock">
                    <asp:Label ID="lblLoginDate" runat="server" Text="XXXXXX"></asp:Label>
                </span>
        </p>
        <p>
            <label>
                会员角色：</label>
            <span class="inputBlock">
                <asp:CheckBoxList ID="cblUserRole" RepeatDirection="Horizontal" runat="server">
                    <asp:ListItem Text="产品供应" Value="产品供应"></asp:ListItem>
                    <asp:ListItem Text="产品求购" Value="产品求购"></asp:ListItem>
                    <asp:ListItem Text="二手供应" Value="二手供应"></asp:ListItem>
                    <asp:ListItem Text="二手求购" Value="二手求购"></asp:ListItem>
                    <asp:ListItem Text="技术转让" Value="技术转让"></asp:ListItem>
                    <asp:ListItem Text="技术求购" Value="技术求购"></asp:ListItem>
                </asp:CheckBoxList>
            </span>
        </p>
        <p>
            <label>
                电话：</label>
            <span class="textBlock">
                <asp:TextBox ID="lblPhone" runat="server"></asp:TextBox>
            </span>
        </p>
        <p>
            <label>
                手机：</label>
            <span class="textBlock">
                <asp:TextBox ID="lblUserMobile" runat="server" Text="XXXXXX"></asp:TextBox>
            </span>
        </p>
        <p>
            <label>
                传真：</label>
            <span class="textBlock">
                <asp:TextBox ID="lblUserFax" runat="server" Text="XXXXXX"></asp:TextBox>
            </span>
        </p>
        <p>
            <label>
                邮箱：</label>
            <span class="textBlock">
                <asp:TextBox ID="lblEmail" runat="server" Text="XXXXXX"></asp:TextBox>
            </span>
        </p>
        <p>
            <label>
                地址：</label>
            <span class="textBlock">
                <asp:TextBox ID="lblUserAddress" runat="server" Text="XXXXXX"></asp:TextBox>
            </span>
        </p>
        <h3>
            公司信息</h3>
        <p>
            <label>
                公司名称：</label>
            <span class="textBlock">
                <asp:TextBox ID="lblCompanyName" runat="server" Text="XXXXXX"></asp:TextBox>
            </span>
        </p>
        <p>
            <label>
                员工人数：</label><span class="textBlock">
                    <asp:TextBox ID="lblEmployeesTotal" runat="server" Text="XXXXXX"></asp:TextBox>人
            </span>
        </p>
        <p>
            <label>
                成立时间：</label><span class="textBlock">
                    <asp:TextBox ID="lblFoundedDate" runat="server" Text="XXXXXX"></asp:TextBox>
                </span>
        </p>
        <p>
            <label>
                联系电话：</label>
            <span class="textBlock">
                <asp:TextBox ID="lblCompanyPhone" runat="server" Text="XXXXXX"></asp:TextBox>
            </span>
        </p>
        <p>
            <label>
                公司地址：</label>
            <span class="textBlock">
                <asp:TextBox ID="lblCompanyAddress" runat="server" Text="XXXXXX"></asp:TextBox>
            </span>
        </p>
        <p>
            <label>
                行业分类：</label>
            <span class="inputBlock">
                <asp:CheckBoxList ID="cblIndustryClassification" RepeatDirection="Horizontal" runat="server">
                    <asp:ListItem Text="内容制作" Value="内容制作"></asp:ListItem>
                    <asp:ListItem Text="制播设备" Value="制播设备"></asp:ListItem>
                    <asp:ListItem Text="传输设备" Value="传输设备"></asp:ListItem>
                    <asp:ListItem Text="系统软件" Value="系统软件"></asp:ListItem>
                    <asp:ListItem Text="专业芯片" Value="专业芯片"></asp:ListItem>
                    <asp:ListItem Text="终端产品" Value="终端产品"></asp:ListItem>
                    <asp:ListItem Text="网络运营" Value="网络运营"></asp:ListItem>
                </asp:CheckBoxList>
            </span>
        </p>
        <p>
            <label>
                供应：</label><span class="inputBlock">
                    <asp:TextBox ID="txtSupply" runat="server" TextMode="MultiLine" class="inputInline"
                        Text="测试服务..."></asp:TextBox>
                </span>
        </p>
        <p>
            <label>
                采购：</label><span class="inputBlock">
                    <asp:TextBox ID="txtPurchase" runat="server" TextMode="MultiLine" class="inputInline"
                        Text="测试服务..."></asp:TextBox>
                </span>
        </p>
        <p>
            <label>
                公司简介：</label></p>
        <p>
            <asp:TextBox ID="txtCompanyProfile" runat="server" TextMode="MultiLine" class="inputInline"
                Text="XX股份有限公司成立于..."></asp:TextBox>
        </p>

        <p>
                    <span class="ui-button-text">
            <asp:Button ID="Button1" runat="server" Text="保存" 
                        class="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" 
                        onclick="Button1_Click" OnClientClick="return checkInput();"/>
            </span>
                </p>
    </div>
</asp:Content>
